package com.migration.model.newdb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 租户表 实体类
 * 表名：haifan_tenant
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "haifan_tenant")
public class HaifanTenant implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 主键，自增长
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 租户名称
     */
    @Column(name = "tenant_name", nullable = false, length = 255)
    private String tenantName;
    
    /**
     * 租户邮箱
     */
    @Column(name = "tenant_email", length = 100)
    private String tenantEmail;
    
    /**
     * 租户联系电话
     */
    @Column(name = "tenant_phone", length = 20)
    private String tenantPhone;
    
    /**
     * 租户地址
     */
    @Column(name = "tenant_address", length = 200)
    private String tenantAddress;
    
    /**
     * 租户logo
     */
    @Column(name = "tenant_logo")
    private byte[] tenantLogo;
    
    /**
     * 0：冻结，1：正常
     * 默认值: 1
     */
    @Column(name = "enable_status", nullable = false)
    private Boolean enableStatus;
    
    /**
     * 0：到期，1：正常
     */
    @Column(name = "expire_status", nullable = false)
    private Boolean expireStatus;
    
    /**
     * 到期时间
     */
    @Column(name = "expire_time")
    private java.time.LocalDateTime expireTime;
    
    /**
     * 到期后提前多少天给租户邮箱发邮件
     */
    @Column(name = "send_email_days")
    private Integer sendEmailDays;
    
    /**
     * 到期后发送邮件频率
     */
    @Column(name = "email_frequency")
    private Integer emailFrequency;
    
    /**
     * 备注
     */
    @Column(name = "remarks", length = 255)
    private String remarks;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time", length = 20)
    private String createTime;
    
    /**
     * 更新时间
     */
    @Column(name = "update_time", length = 20)
    private String updateTime;
    
    /**
     * 创建人
     */
    @Column(name = "create_by")
    private Long createBy;
    
    /**
     * 更新人
     */
    @Column(name = "update_by")
    private Long updateBy;
    
    /**
     * 逻辑删除标志（0：正常，1：删除）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Boolean isDel;
    
    @Override
    public String toString() {
        return "HaifanTenant{" +
            "id=" + id +
            ", tenantName=" + tenantName +
            ", tenantEmail=" + tenantEmail +
            ", tenantPhone=" + tenantPhone +
            ", tenantAddress=" + tenantAddress +
            ", tenantLogo=" + tenantLogo +
            ", enableStatus=" + enableStatus +
            ", expireStatus=" + expireStatus +
            ", expireTime=" + expireTime +
            ", sendEmailDays=" + sendEmailDays +
            ", emailFrequency=" + emailFrequency +
            ", remarks=" + remarks +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", createBy=" + createBy +
            ", updateBy=" + updateBy +
            ", isDel=" + isDel +
        '}';
    }
} 